﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects.DataClasses;
using WA.Core.Employees.Model;


[assembly: global::System.Data.Objects.DataClasses.EdmSchemaAttribute()]
namespace WA.Core.Employees.Model
{
    [EdmEntityType(Name = "Employee", NamespaceName = "WA.Core.Employees.Model")]
    public class Employee : BaseEntity<int>
    {
        protected string firstName;
        protected string lastName;
        protected string fatherName;
        protected string sex;
        protected string nationality;
        protected string ss;
        protected decimal coefficient;
        protected string pio;
        protected string registerNumber;
        protected string account;
        protected string drivingLicence;
        protected string marriageStatus;

        protected BirthInfo birthInfo;
        protected AddressInfo addressInfo;
        protected IdentityCardInfo identityCardInfo;
        protected EducationInfo educationInfo;
        protected WorkAddressInfo workAddressInfo;
        protected WorkInfo workInfo;
        protected StazInfo stazInfo;
        protected ContactInfo contactInfo;

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        public int EmployeeID
        {
            get
            {
                return base.ID;

            }
            set
            {
                this.PropertyChanging("EmployeeID");
                base.ID = value;
                this.PropertyChanged("EmployeeID");
            }
        }
        
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string FirstName
        {
            get { return firstName; }
            set
            {
                this.PropertyChanging("FirstName");
                firstName = value;
                this.PropertyChanged("FirstName");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string LastName
        {
            get { return lastName; }
            set
            {
                this.PropertyChanging("LastName");
                lastName = value;
                this.PropertyChanged("LastName");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string FatherName
        {
            get { return fatherName; }
            set
            {
                this.PropertyChanging("FatherName");
                fatherName = value;
                this.PropertyChanged("FatherName");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string Sex
        {
            get { return sex; }
            set
            {
                this.PropertyChanging("Sex");
                sex = value;
                this.PropertyChanged("Sex");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string Nationality
        {
            get { return nationality; }
            set
            {
                this.PropertyChanging("Nationality");
                nationality = value;
                this.PropertyChanged("Nationality");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string SS
        {
            get { return ss; }
            set
            {
                this.PropertyChanging("SS");
                ss = value;
                this.PropertyChanged("SS");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public decimal Coefficient
        {
            get { return coefficient; }
            set
            {
                this.PropertyChanging("Coefficient");
                coefficient = value;
                this.PropertyChanged("Coefficient");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string PIO
        {
            get { return pio; }
            set
            {
                this.PropertyChanging("PIO");
                pio = value;
                this.PropertyChanged("PIO");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string RegisterNumber
        {
            get { return registerNumber; }
            set
            {
                this.PropertyChanging("RegisterNumber");
                registerNumber = value;
                this.PropertyChanged("RegisterNumber");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string Account
        {
            get { return account; }
            set
            {
                this.PropertyChanging("Account");
                account = value;
                this.PropertyChanged("Account");
            }

        }
        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string DrivingLicence
        {
            get { return drivingLicence; }
            set
            {
                this.PropertyChanging("DrivingLicence");
                drivingLicence = value;
                this.PropertyChanged("DrivingLicence");
            }

        }

        [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
        public string MarriageStatus
        {
            get { return marriageStatus; }
            set
            {
                this.PropertyChanging("MarriageStatus");
                marriageStatus = value;
                this.PropertyChanged("MarriageStatus");
            }

        }

        public List<SalaryCalculation> SalaryCalculations
        { 
            get;
            set; 
        }

        [global::System.Data.Objects.DataClasses.EdmRelationshipNavigationPropertyAttribute("WA.Core.DomainModel", "EmployeeSalaryCalculation", "SalaryCalculation")]
        public global::System.Data.Objects.DataClasses.EntityCollection<SalaryCalculation> SalaryCalculation
        {
            get
            {
                return ((global::System.Data.Objects.DataClasses.IEntityWithRelationships)(this)).RelationshipManager.GetRelatedCollection<SalaryCalculation>("WA.Core.DomainModel.EmployeeSalaryCalculation", "SalaryCalculation");
            }
        }

        #region BirthIfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public BirthInfo BirthInfoData
        {
            get
            {
                return birthInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (birthInfo != null)
                    {
                        // Reset the change tracker.
                        birthInfo.SetComplexChangeTracker("BirthInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("BirthInfo");
                    birthInfo = value;
                    _changeTracker.EntityMemberChanged("BirthInfo");
                }
                else
                {
                    birthInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (birthInfo != null)
                {
                    birthInfo.SetComplexChangeTracker("BirthInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class BirthInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected DateTime date;
            protected string place;
            protected string city;
            protected string country;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public DateTime Date
            {
                get { return date; }
                set
                {
                    this.PropertyChanging("Date");
                    date = value;
                    this.PropertyChanged("Date");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string BirthPlace
            {
                get { return place; }
                set
                {
                    this.PropertyChanging("Place");
                    place = value;
                    this.PropertyChanged("Place");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string BirthCity
            {
                get { return city; }
                set
                {
                    this.PropertyChanging("City");
                    city = value;
                    this.PropertyChanged("City");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string BirthCountry
            {
                get { return country; }
                set
                {
                    this.PropertyChanging("Country");
                    country = value;
                    this.PropertyChanged("Country");
                }

            }
        }
        #endregion

        #region AddressInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public AddressInfo AddressInfoData
        {
            get
                {
                    return addressInfo;
                }
            set
                {
                    // The change tracker may be null during object materialization.
                    if (_changeTracker != null)
                    {
                        // Since this is a complex property, we need to reset the change 
                        // tracker on the complex type. 
                        if (addressInfo != null)
                        {
                            // Reset the change tracker.
                            addressInfo.SetComplexChangeTracker("AddressInfo", null);
                        }

                        // Report the change.
                        _changeTracker.EntityMemberChanging("AddressInfo");
                        addressInfo = value;
                        _changeTracker.EntityMemberChanged("AddressInfo");
                    }
                    else
                    {
                        addressInfo = value;
                    }

                    // Reset the change tracker. Complex type property cannot be null.
                    if (addressInfo != null)
                    {
                        addressInfo.SetComplexChangeTracker("AddressInfo", _changeTracker);
                    }

                }

        }

        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "AddressInfo")]
        public partial class AddressInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected string address;
            protected string place;
            protected string city;
            protected string country;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Address
            {
                get { return address; }
                set
                {
                    this.PropertyChanging("Address");
                    address = value;
                    this.PropertyChanged("Address");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Place
            {
                get { return place; }
                set
                {
                    this.PropertyChanging("Place");
                    place = value;
                    this.PropertyChanged("Place");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string City
            {
                get { return city; }
                set
                {
                    this.PropertyChanging("City");
                    city = value;
                    this.PropertyChanged("City");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Country
            {
                get { return country; }
                set
                {
                    this.PropertyChanging("Country");
                    country = value;
                    this.PropertyChanged("Country");
                }

            }
        }

        #endregion

        #region WorkAddressInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public WorkAddressInfo WorkAddressInfoData
        {
            get
            {
                return workAddressInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (workAddressInfo != null)
                    {
                        // Reset the change tracker.
                        workAddressInfo.SetComplexChangeTracker("WorkAddressInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("WorkAddressInfo");
                    workAddressInfo = value;
                    _changeTracker.EntityMemberChanged("WorkAddressInfo");
                }
                else
                {
                    workAddressInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (workAddressInfo != null)
                {
                    workAddressInfo.SetComplexChangeTracker("WorkAddressInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class WorkAddressInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected string address;
            protected string place;
            protected string city;
            protected string country;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Address
            {
                get { return address; }
                set
                {
                    this.PropertyChanging("Address");
                    address = value;
                    this.PropertyChanged("Address");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string BirthPlace
            {
                get { return place; }
                set
                {
                    this.PropertyChanging("Place");
                    place = value;
                    this.PropertyChanged("Place");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string BirthCity
            {
                get { return city; }
                set
                {
                    this.PropertyChanging("City");
                    city = value;
                    this.PropertyChanged("City");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string BirthCountry
            {
                get { return country; }
                set
                {
                    this.PropertyChanging("Country");
                    country = value;
                    this.PropertyChanged("Country");
                }

            }
        }
        #endregion

        #region EducationInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public EducationInfo EducationInfoData
        {
            get
            {
                return educationInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (educationInfo != null)
                    {
                        // Reset the change tracker.
                        educationInfo.SetComplexChangeTracker("EducationInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("EducationInfo");
                    educationInfo = value;
                    _changeTracker.EntityMemberChanged("EducationInfo");
                }
                else
                {
                    educationInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (educationInfo != null)
                {
                    educationInfo.SetComplexChangeTracker("EducationInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class EducationInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected string institution;
            protected string name;
            protected string employment;
            protected DateTime documentDate;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Employment
            {
                get { return employment; }
                set
                {
                    this.PropertyChanging("Employment");
                    employment = value;
                    this.PropertyChanged("Employment");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Institution
            {
                get { return institution; }
                set
                {
                    this.PropertyChanging("Institution");
                    institution = value;
                    this.PropertyChanged("Institution");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Name
            {
                get { return name; }
                set
                {
                    this.PropertyChanging("Name");
                    name = value;
                    this.PropertyChanged("Name");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public DateTime DocumentDate
            {
                get { return documentDate; }
                set
                {
                    this.PropertyChanging("DocumentDate");
                    documentDate = value;
                    this.PropertyChanged("DocumentDate");
                }

            }
        }
        #endregion

        #region StazInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public StazInfo StazInfoData
        {
            get
            {
                return stazInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (stazInfo != null)
                    {
                        // Reset the change tracker.
                        stazInfo.SetComplexChangeTracker("StazInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("StazInfo");
                    stazInfo = value;
                    _changeTracker.EntityMemberChanged("StazInfo");
                }
                else
                {
                    stazInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (stazInfo != null)
                {
                    stazInfo.SetComplexChangeTracker("StazInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class StazInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected int years;
            protected int months;
            protected int days;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public int Years
            {
                get { return years; }
                set
                {
                    this.PropertyChanging("Years");
                    years = value;
                    this.PropertyChanged("Years");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public int Months
            {
                get { return months; }
                set
                {
                    this.PropertyChanging("Months");
                    months = value;
                    this.PropertyChanged("Months");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public int Days
            {
                get { return days; }
                set
                {
                    this.PropertyChanging("Days");
                    days = value;
                    this.PropertyChanged("Days");
                }

            }
        }
        #endregion

        #region IdentityCardInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public IdentityCardInfo IdentityCardInfoData
        {
            get
            {
                return identityCardInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (identityCardInfo != null)
                    {
                        // Reset the change tracker.
                        identityCardInfo.SetComplexChangeTracker("IdentityCardInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("IdentityCardInfo");
                    identityCardInfo = value;
                    _changeTracker.EntityMemberChanged("IdentityCardInfo");
                }
                else
                {
                    identityCardInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (identityCardInfo != null)
                {
                    identityCardInfo.SetComplexChangeTracker("StazInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class IdentityCardInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected string jmbg;
            protected string serialNumber;
            protected string place;
            protected DateTime date;
            protected string citizenship;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string JMBG
            {
                get { return jmbg; }
                set
                {
                    this.PropertyChanging("JMBG");
                    jmbg = value;
                    this.PropertyChanged("JMBG");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string SerialNumber
            {
                get { return serialNumber; }
                set
                {
                    this.PropertyChanging("SerialNumber");
                    serialNumber = value;
                    this.PropertyChanged("SerialNumber");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Place
            {
                get { return place; }
                set
                {
                    this.PropertyChanging("Place");
                    place = value;
                    this.PropertyChanged("Place");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public DateTime Date
            {
                get { return date; }
                set
                {
                    this.PropertyChanging("Date");
                    date = value;
                    this.PropertyChanged("Date");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Citizenship
            {
                get { return citizenship; }
                set
                {
                    this.PropertyChanging("Citizenship");
                    citizenship = value;
                    this.PropertyChanged("Citizenship");
                }

            }

        }
        #endregion

        #region WorkInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public WorkInfo WorkInfoData
        {
            get
            {
                return workInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (workInfo != null)
                    {
                        // Reset the change tracker.
                        workInfo.SetComplexChangeTracker("WorkInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("WorkInfo");
                    workInfo = value;
                    _changeTracker.EntityMemberChanged("WorkInfo");
                }
                else
                {
                    workInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (workInfo != null)
                {
                    workInfo.SetComplexChangeTracker("WorkInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class WorkInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected string place;
            protected DateTime startDate;
            protected DateTime endDate;
            protected string workEndReason;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Place
            {
                get { return place; }
                set
                {
                    this.PropertyChanging("Place");
                    place = value;
                    this.PropertyChanged("Place");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public DateTime StartDate
            {
                get { return startDate; }
                set
                {
                    this.PropertyChanging("StartDate");
                    startDate = value;
                    this.PropertyChanged("StartDate");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public DateTime EndDate
            {
                get { return endDate; }
                set
                {
                    this.PropertyChanging("EndDate");
                    endDate = value;
                    this.PropertyChanged("EndDate");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string WorkEndReason
            {
                get { return workEndReason; }
                set
                {
                    this.PropertyChanging("WorkEndReason");
                    workEndReason = value;
                    this.PropertyChanged("WorkEndReason");
                }

            }
        }
        #endregion

        #region ContactInfo

        [global::System.Data.Objects.DataClasses.EdmComplexPropertyAttribute()]
        public ContactInfo ContactInfoData
        {
            get
            {
                return contactInfo;
            }
            set
            {
                // The change tracker may be null during object materialization.
                if (_changeTracker != null)
                {
                    // Since this is a complex property, we need to reset the change 
                    // tracker on the complex type. 
                    if (contactInfo != null)
                    {
                        // Reset the change tracker.
                        contactInfo.SetComplexChangeTracker("ContactInfo", null);
                    }

                    // Report the change.
                    _changeTracker.EntityMemberChanging("ContactInfo");
                    contactInfo = value;
                    _changeTracker.EntityMemberChanged("ContactInfo");
                }
                else
                {
                    contactInfo = value;
                }

                // Reset the change tracker. Complex type property cannot be null.
                if (contactInfo != null)
                {
                    contactInfo.SetComplexChangeTracker("ContactInfo", _changeTracker);
                }

            }

        }


        [global::System.Data.Objects.DataClasses.EdmComplexTypeAttribute(NamespaceName = "WA.Core.Employees.Employee", Name = "BirthInfo")]
        public partial class ContactInfo : BaseComplexType
        {
            override public void SetComplexChangeTracker(string rootComplexPropertyName, IEntityChangeTracker changeTracker)
            {
                // Call SetChangeTracker on the base class to set the change tracker 
                // and the name of the root complex type property on the entity.
                base.SetComplexChangeTracker(rootComplexPropertyName, changeTracker);
            }

            protected string phoneNumber;
            protected string mobilePhoneNumber;
            protected string email;

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string PhoneNumber
            {
                get { return phoneNumber; }
                set
                {
                    this.PropertyChanging("PhoneNumber");
                    phoneNumber = value;
                    this.PropertyChanged("PhoneNumber");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string MobilePhoneNumber
            {
                get { return mobilePhoneNumber; }
                set
                {
                    this.PropertyChanging("MobilePhoneNumber");
                    mobilePhoneNumber = value;
                    this.PropertyChanged("MobilePhoneNumber");
                }

            }

            [global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute(IsNullable = false)]
            public string Email
            {
                get { return email; }
                set
                {
                    this.PropertyChanging("Email");
                    email = value;
                    this.PropertyChanged("Email");
                }

            }
        }
        #endregion
    }
    
}